Skip to content

Enable boolean masking through nest accessor #329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 15, 2025
Merged

Enable boolean masking through nest accessor #329

merged 3 commits into from
Aug 15, 2025

Conversation

dougbrn
Copy link
Collaborator

@dougbrn dougbrn commented Aug 15, 2025

Allows boolean masking through the nest accessor, e.g.:
nf["nested"].nest[nf["nested.t"] < 5]

Takes a step towards #274, but wouldn't neccesarily say this resolves it. As we discussed, this step is mainly to see how the implementation feels when centered on the .nest accessor, but we may move to a more direct nested series implementation #304 in the future

Performance looks comparable to NestedFrame.query, with a bit less overhead perhaps

Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.11%. Comparing base (4186d56) to head (91dffbe).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #329      +/-   ##
==========================================
+ Coverage   98.08%   98.11%   +0.02%     
==========================================
  Files          18       18              
  Lines        1724     1748      +24     
==========================================
+ Hits         1691     1715      +24     
  Misses         33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

github-actions bot commented Aug 15, 2025

Before [6158e29] After [44447ea] Ratio Benchmark (Parameter)
41.1±2ms 51.3±1ms ~1.25 benchmarks.ReassignHalfOfNestedSeries.time_run
12.5±0.5ms 11.2±0.4ms ~0.89 benchmarks.NestedFrameAddNested.time_run
1.54±0.03s 1.58±0.2s 1.03 benchmarks.ReadFewColumnsS3.time_run
1.58±0.01s 1.60±0.03s 1.02 benchmarks.ReadFewColumnsHTTPS.time_run
968M 992M 1.02 benchmarks.ReadFewColumnsS3.peakmem_run
177M 179M 1.01 benchmarks.ReadFewColumnsHTTPS.peakmem_run
135M 135M 1.00 benchmarks.CountNestedBy.peakmem_run
65.1±0.3ms 65.4±0.9ms 1.00 benchmarks.CountNestedBy.time_run
102M 102M 1.00 benchmarks.NestedFrameAddNested.peakmem_run
107M 107M 1.00 benchmarks.NestedFrameQuery.peakmem_run

Click here to view all benchmarks.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@dougbrn dougbrn changed the title [WIP] nest accessor masking nest accessor masking Aug 15, 2025
@dougbrn dougbrn changed the title nest accessor masking Enable boolean masking through nest accessor Aug 15, 2025
@dougbrn dougbrn marked this pull request as ready for review August 15, 2025 19:09
@dougbrn dougbrn requested a review from hombit August 15, 2025 19:11
Copy link
Collaborator

@hombit hombit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@dougbrn dougbrn merged commit 1090b6e into main Aug 15, 2025
11 checks passed
@dougbrn dougbrn deleted the explore_masking branch August 15, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants